package com.woniu.user.client;

import com.woniu.user.dto.EmployeeNameDTO;
import com.woniu.user.dto.UserInfoFeignDto;
import com.woniu.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * @author jiang
 */
@FeignClient(path = "/user",name = "xinan-user")
public interface UserFeignClient {
    @GetMapping("/userInfo/getUserInfo")
    public Result<UserInfoFeignDto> getUserInfo(@RequestParam("userId") String userId);

    @GetMapping("/userInfo/changeDefaultAddress")
    public Result<UserInfoFeignDto> changeDefaultAddress(@RequestParam("addressId") Integer addressId , @RequestParam("addressName") String addressName, @RequestParam("userId")Integer userId);

    @GetMapping("/areaCode/getAreaCodeById")
    public Result<String> getAreaCodeById(@RequestParam("areaCodeId") Integer areaCodeId);

    @GetMapping("/employeeInfo/selectEmployeeInfo")
    public Result<List<EmployeeNameDTO>> selectEmployeeInfo();

    @PutMapping("/employeeInfo/updateWorkerInfoStatus")
    public Result updateWorkerInfoStatus(@RequestParam("userId") String userId);

}
